package com.wuliupai.delivery.wuliupaidelivery.utils;

import android.app.Activity;

import com.wuliupai.delivery.wuliupaidelivery.R;

import org.androidannotations.annotations.EBean;

/**
 * Descriptions：动画相关的工具
 * <p>
 * Author：ChenME
 * Date：11/11/2016
 * Email：ibelieve1210@163.com
 */
@EBean(scope = EBean.Scope.Singleton)
public class AnimUtils {

    public void popInAnimation(Activity activity) {
        activity.overridePendingTransition(R.anim.in_from_bottom, R.anim.shade_out);
    }

    public void popOutAnimation(Activity activity) {
        activity.overridePendingTransition(R.anim.shade_in, R.anim.out_to_bottom);
    }


    public void leftInAnimation(Activity activity) {
        activity.overridePendingTransition(R.anim.activity_open_enter, R.anim.activity_open_exit);
    }

    public void leftOutAnimation(Activity activity) {
        activity.overridePendingTransition(R.anim.activity_close_enter, R.anim.activity_close_exit);
    }

}
